<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title></title>
	<script src="js/jquery-3.5.1.js" type="text/javascript" charset="utf-8"></script>
	<script src="js/vue.min.js"></script>
	<link rel="stylesheet" type="text/css" href="./js/vant-UI/index.css" />
	<script src="./js/vant-UI/vant.min.js" type="text/javascript" charset="utf-8"></script>
	<link rel="stylesheet" type="text/css" href="./js/element-UI/elementUI.css" />
	<script src="./js/element-UI/elementUI.js" type="text/javascript" charset="utf-8"></script>
	<style type="text/css">
		.van-nav-bar {
			background-color: #0E90D2;
		}

		.van-nav-bar .van-icon {
			color: #0E90D2;
			background-color: #0E90D2;
		}

		.van-nav-bar__text {
			color: #FFF;
			font-weight: bolder;
		}

		.el-row {
			width: 200px;
		}

		.el-col-12 {
			width: 100%;
		}

		.right {
			width: 80%;
			padding: 20px;
		}

		.pagination {
			margin-top: 30px;
		}

		.el-table--enable-row-transition .el-table__body td {
			text-align: center;
		}

		.el-table th>.cell {
			text-align: center;
		}
		.van-search{
			padding: 0;
		}
	</style>
</head>
<body>
<div id="root">
	<van-nav-bar title="" left-text="员工管理系统" right-text="退出登录" left-arrow @click-left="onClickLeft"
				 @click-right="onClickRight"></van-nav-bar>

	<div style="display: flex;flex-direction: row;">
		<el-row class="tac">
			<el-col :span="12">
				<el-menu default-active="1-1" class="el-menu-vertical-demo" @open="handleOpen"
						 @close="handleClose">
					<el-submenu index="1">
						<template slot="title">
							<i class="el-icon-user-solid"></i>
							<span>人事管理</span>
						</template>
						<el-menu-item-group>
							<el-menu-item index="1-1" @click="choose(index=1)">
								部门管理
							</el-menu-item>
							<el-menu-item index="1-2" @click="choose(index=2)">用户管理</el-menu-item>
						</el-menu-item-group>
					</el-submenu>
					<el-submenu index="2">
						<template slot="title">
							<i class="el-icon-s-tools"></i>
							<span>系统管理</span>
						</template>
						<el-menu-item-group>
							<el-menu-item index="2-1" @click="choose(index=3)">角色管理</el-menu-item>
						</el-menu-item-group>
					</el-submenu>
					<el-submenu index="3">
						<template slot="title">
							<i class="el-icon-s-data"></i>
							<span>统计</span>
						</template>
						<el-menu-item-group>
							<el-menu-item index="3-1" @click="choose(index=4)">
								工作完成情况
							</el-menu-item>
							<el-menu-item index="3-2" @click="choose(index=6)">工资对比</el-menu-item>
						</el-menu-item-group>
					</el-submenu>
					<el-menu-item index="4" @click="choose(index=5)">
						<i class="el-icon-question"></i>
						<span slot="title">修改密码</span>
					</el-menu-item>
				</el-menu>
				<!-- <van-calendar title="日历" :poppable="false" :show-confirm="false" :style="{ height: '300px' }"
                    :show-title="false" :row-height="48" /> -->
			</el-col>
		</el-row>
		<div v-if="manage == 1" class="right">
			<el-breadcrumb separator-class="el-icon-arrow-right" style="margin-bottom: 20px;">
				<el-breadcrumb-item>首页</el-breadcrumb-item>
				<el-breadcrumb-item>人事管理</el-breadcrumb-item>
				<el-breadcrumb-item>部门管理</el-breadcrumb-item>
			</el-breadcrumb>
			<el-row style="display: flex;flex-direction: row;">
				<el-button type="primary" @click="adddeaprt">添加部门</el-button>
				<el-button type="danger">删除选中</el-button>
			</el-row>
			<div>
				<template>
					<el-table ref="multipleTable" :data="tableData_bumen" tooltip-effect="dark" border
							  style="width: 100%;margin-top: 20px;" @selection-change="handleSelectionChange">
						<el-table-column type="selection" width="55" @click="aaa"></el-table-column>
						<el-table-column label="ID" width="120">
							<template slot-scope="scope">{{ scope.row.id }}</template>
						</el-table-column>
						<el-table-column prop="name" label="部门名称" width="120">
						</el-table-column>
						<el-table-column prop="num" label="部门人数" width="120">
						</el-table-column>
						<el-table-column prop="date" label="创建时间" width="120">
						</el-table-column>
						<el-table-column prop="text" label="详细信息" width="320">
						</el-table-column>
						<el-table-column align="right">
							<template slot="header" slot-scope="scope">
								<el-input v-model="search" size="mini" placeholder="输入关键字搜索" />
							</template>
							<template slot-scope="scope">
								<el-button size="mini" @click="handleEdit_department(scope.row.id, scope.row)">编辑
								</el-button>
								<el-button size="mini" type="danger"
										   @click="handleDelete(scope.row.id, scope.row,'Department')">
									删除</el-button>
							</template>
						</el-table-column>
					</el-table>
				</template>
			</div>
<!--			部门管理分页-->
			<el-pagination
					@size-change="DepHandleSizeChange"
					@current-change="DepHandleCurrentChange"
					:current-page="this.currentPage"
					:page-sizes="[5, 10, 15, 20]"
					:page-size="this.pageSize"
					layout="total, sizes, prev, pager, next, jumper"
					:total="this.department_pageTotal">
			</el-pagination>
		</div>
		<div v-if="manage == 2" class="right">
			<el-breadcrumb separator-class="el-icon-arrow-right" style="margin-bottom: 20px;">
				<el-breadcrumb-item>首页</el-breadcrumb-item>
				<el-breadcrumb-item>人事管理</el-breadcrumb-item>
				<el-breadcrumb-item>用户管理</el-breadcrumb-item>
			</el-breadcrumb>
			<el-row style="display: flex;flex-direction: row;margin-bottom: 20px;width: 100%;">
				<div style="display: flex;flex-direction: row;width: 75%;">
					<el-button type="primary" @click="addstaff">添加人员</el-button>
					<el-button type="primary" @click="printer">导出人员</el-button>
					<el-button type="danger">删除选中</el-button>
				</div>
				<div>
					<van-search v-model="value_search" show-action label="搜索员工" placeholder="请输入搜索关键词" @search="onSearch">
						<template #action>
							<div @click="onSearch">搜索</div>
						</template>
					</van-search>
				</div>
			</el-row>
			<template>
				<el-table :data="tableData_renyuan" border style="width: 100%">
					<el-table-column type="selection" width="55"></el-table-column>
					<el-table-column fixed prop="date" label="ID" width="100">
					</el-table-column>
					<el-table-column prop="name" label="姓名" width="100">
					</el-table-column>
					<el-table-column prop="gender" label="性别" width="100">
					</el-table-column>
					<el-table-column prop="department" label="所在部门" width="120">
					</el-table-column>
					<el-table-column prop="email" label="邮箱" width="180">
					</el-table-column>
					<el-table-column prop="money" label="工资" width="120">
					</el-table-column>
					<el-table-column prop="money" label="工资" width="120">
					</el-table-column>
					<el-table-column prop="city" label="籍贯" width="120">
					</el-table-column>
					<el-table-column prop="hunyin" label="婚姻状况" width="120">
					</el-table-column>
					<el-table-column fixed="right" label="操作" width="200">
						<template slot-scope="scope">
							<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">编辑
							</el-button>
							<el-button size="mini" type="danger" @click="handleDelete(scope.row.id, scope.row,'Staff')">
								删除</el-button>
						</template>
					</el-table-column>
				</el-table>
			</template>
<!--			员工管理分页-->
			<el-pagination
					@size-change="StaffHandleSizeChange"
					@current-change="StaffHandleCurrentChange"
					:current-page="this.currentPage"
					:page-sizes="[5, 10, 15, 20]"
					:page-size="this.pageSize"
					layout="total, sizes, prev, pager, next, jumper"
					:total="this.staff_pageTotal">
			</el-pagination>
		</div>
		<div v-if="manage == 3" class="right">
			<el-breadcrumb separator-class="el-icon-arrow-right" style="margin-bottom: 20px;">
				<el-breadcrumb-item>首页</el-breadcrumb-item>
				<el-breadcrumb-item>系统管理</el-breadcrumb-item>
				<el-breadcrumb-item>角色管理</el-breadcrumb-item>
			</el-breadcrumb>
			<el-row style="display: flex;flex-direction: row;margin-bottom: 20px;">
				<el-button type="primary" @click="addroot">添加管理员</el-button>
			</el-row>
			<template>
				<el-table :data="tableData_sys" border style="width: 100%">
					<el-table-column type="selection" width="55"></el-table-column>
					<el-table-column fixed prop="id" label="ID" width="100">
					</el-table-column>
					<el-table-column prop="email" label="角色名称" width="100">
					</el-table-column>
					<el-table-column prop="date" label="添加时间" width="100">
					</el-table-column>
					<el-table-column prop="gender" label="角色描述" width="400">
					</el-table-column>
					<el-table-column fixed="right" label="操作" width="400">
						<template slot-scope="scope">
							<el-button size="mini" @click="handleEdit_root(scope.$index, scope.row)">编辑
							</el-button>
							<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">分配权限
							</el-button>
							<el-button size="mini" type="danger" @click="handleDelete(scope.row.id, scope.row,'User')">
								删除</el-button>
						</template>
					</el-table-column>
				</el-table>
			</template>
			<el-pagination
					@size-change="UserHandleSizeChange"
					@current-change="UserHandleCurrentChange"
					:current-page="this.currentPage"
					:page-sizes="[5, 10, 15, 20]"
					:page-size="this.pageSize"
					layout="total, sizes, prev, pager, next, jumper"
					:total="this.user_pageTotal">
			</el-pagination>
			<!--					<el-pagination class="pagination" background layout="prev, pager, next" :total="1000" layout="total, sizes, prev, pager, next, jumper"-->
			<!--								   :current-page="currentPage" :current-page="currentPage"	:page-size="pagesize"  @current-change="handleCurrentChange">-->
			<!--					</el-pagination>-->
		</div>
		<embed v-if="manage == 4" style="width: 100%;height: 600px;" src="echartsdepartments.html"></embed>
		<div v-if="manage == 5" class="right">
			<el-breadcrumb separator-class="el-icon-arrow-right">
				<el-breadcrumb-item>首页</el-breadcrumb-item>
				<el-breadcrumb-item>修改密码</el-breadcrumb-item>
			</el-breadcrumb>
			<van-form style="width: 300px;margin-top: 100px;margin-left: 500px;border: 1px solid #000000;"
					  @submit="onSubmit">
				<van-field v-model="username" name="用户名" label="用户名" placeholder="用户名"
						   :rules="[{ required: true, message: '请填写用户名' }]"></van-field>
				<van-field v-model="password" type="password" name="密码" label="密码" placeholder="密码"
						   :rules="[{ required: true, message: '请填写密码' }]"></van-field>
				<div style="margin: 16px;">
					<van-button round block type="info" native-type="submit">提交</van-button>
				</div>
			</van-form>
		</div>
		<embed v-if="manage == 6" style="width: 100%;height: 600px;" src="echartsstaff.html"></embed>
	</div>
	<van-dialog v-model="show_department" title="添加部门" confirm-button-text="取消">
		<van-form @submit="onSubmit('Department')">
			<van-field v-model="adddepartment.name" name="用户名" label="部门名称" placeholder="部门名称"
					   :rules="[{ required: true, message: '请填写用户名' }]"></van-field>
			<van-field v-model="adddepartment.detail" name="用户名" label="详细信息" placeholder="详细信息"
					   :rules="[{ required: true, message: '请填写用户名' }]"></van-field>
			<div style="margin: 16px;">
				<van-button round block type="info" native-type="submit">提交</van-button>
			</div>
		</van-form>
	</van-dialog>
	<van-dialog v-model="show_changeDepartment" title="修改部门" confirm-button-text="取消">
		<van-form @submit="changeSubmit('Department')">
			<van-field v-model="adddepartment.name" name="用户名" label="部门名称" placeholder="部门名称"
					   :rules="[{ required: true, message: '请填写用户名' }]"></van-field>
			<van-field v-model="adddepartment.text" name="用户名" label="详细信息" placeholder="详细信息"
					   :rules="[{ required: true, message: '请填写用户名' }]"></van-field>
			<div style="margin: 16px;">
				<van-button round block type="info" native-type="submit">提交</van-button>
			</div>
		</van-form>
	</van-dialog>
	<van-dialog v-model="show_staff" title="添加用户" confirm-button-text="取消">
		<van-form @submit="onSubmit('Staff')">
			<van-field v-model="addstaffs.name" name="姓名" label="姓名" placeholder="姓名"
					   :rules="[{ required: true, message: '请填写用户名' }]"></van-field>
			<van-field v-model="addstaffs.gender" name="性别" label="性别" placeholder="男/女"
					   :rules="[{ required: true, message: '请填写用户名' }]"></van-field>
			<van-field v-model="addstaffs.department" name="用户名" label="部门" placeholder="部门"
					   :rules="[{ required: true, message: '请填写用户名' }]"></van-field>
			<van-field v-model="addstaffs.email" name="用户名" label="邮箱" placeholder="邮箱"
					   :rules="[{ required: true, message: '请填写用户名' }]"></van-field>
			<div style="margin: 16px;">
				<van-button round block type="info" native-type="submit">提交</van-button>
			</div>
		</van-form>
	</van-dialog>
	<van-dialog v-model="show_changeStaff" title="修改员工" confirm-button-text="取消">
		<van-form @submit="changeSubmit('Staff')">
			<van-field v-model="addstaffs.name" name="姓名" label="姓名" placeholder="姓名"
					   :rules="[{ required: true, message: '请填写用户名' }]"></van-field>
			<van-field v-model="addstaffs.gender" name="性别" label="性别" placeholder="男/女"
					   :rules="[{ required: true, message: '请填写用户名' }]"></van-field>
			<van-field v-model="addstaffs.department" name="用户名" label="部门" placeholder="部门"
					   :rules="[{ required: true, message: '请填写用户名' }]"></van-field>
			<van-field v-model="addstaffs.email" name="用户名" label="邮箱" placeholder="邮箱"
					   :rules="[{ required: true, message: '请填写用户名' }]"></van-field>
			<div style="margin: 16px;">
				<van-button round block type="info" native-type="submit">提交</van-button>
			</div>
		</van-form>
	</van-dialog>
	<van-dialog v-model="show_root" title="添加管理员" confirm-button-text="取消">
		<van-form @submit="onSubmit('User')">
			<van-field v-model="addrooter.name" name="email" label="角色名称" placeholder="角色名称"
					   :rules="[{ required: true, message: '请填写邮箱' }]"></van-field>
			<van-field v-model="addrooter.detail" name="password" label="描述" placeholder="描述"
					   :rules="[{ required: true, message: '请填写密码' }]"></van-field>

			<div style="margin: 16px;">
				<van-button round block type="info" native-type="submit">提交</van-button>
			</div>
		</van-form>
	</van-dialog>
	<van-dialog v-model="show_changeRoot" title="修改管理员" confirm-button-text="取消">
		<van-form @submit="changeSubmit('User')">
			<van-field v-model="addrooter.name" name="email" label="角色名称" placeholder="角色名称"
					   :rules="[{ required: true, message: '请填写邮箱' }]"></van-field>
			<van-field v-model="addrooter.password" name="password" label="密码" placeholder="密码"
					   :rules="[{ required: true, message: '请填写密码' }]"></van-field>

			<div style="margin: 16px;">
				<van-button round block type="info" native-type="submit">提交</van-button>
			</div>
		</van-form>
	</van-dialog>
	<van-dialog v-model="show_delete" title="确认删除2" @click="open" show-cancel-button>
		<div style="margin-left: 30px;line-height: 50px;">您即将删除 <span style="color: red;font-weight: bold;">{{delete_text}}</span> 的全部信息</div>
	</van-dialog>

</div>
</body>
<script type="text/javascript">
	var vm = new Vue({
		el: "#root",
		data: {
			tableData_sys:'',
			staff_pageTotal:'',
			department_pageTotal:'',
			user_pageTotal:'',
			currentPage:1,
			pageSize:5,
			delete_text:'',
			value_search: '',
			show_department: false,
			show_staff: false,
			show_root: false,
			show_delete:false,
			show_changeDepartment: false,
			show_changeStaff: false,
			show_changeRoot: false,
			username: '',
			password: '',
			isCollapse: true,
			daohang1: "人事管理",
			daohang2: "部门管理",
			tableData_bumen: '',
			search: '',
			manage: 1,
			adddepartment: [{
				id:'',
				name: '',
				num: '',
				detail: '',
			}],
			addstaffs: [{
				id:'',
				name: '',
				gender: '',
				department: '',
				email: '',
				wages: '',
				city: '',
				marriage: ''
			}],
			addrooter: [{
				name: '',
				password:'',
				detail: '',
			}]
		},
		methods: {
			aaa(){
				console.log("111")
			},
			onSearch() {

			},
			addroot() {
				this.addrooter = []
				this.show_root = true
			},
			addstaff() {
				this.addstaffs = []
				this.show_staff = true
			},
			adddeaprt() {
				this.adddepartment = []
				this.show_department = true
			},
			onSubmit(values) {
				let that = this
				console.log(values)
				let data
				switch (values){
					case 'Staff':{
						data ={
							name : this.addstaffs.name,
							gender :this.addstaffs.gender,
							department : this.addstaffs.department,
							email : this.addstaffs.email
						}
						break
					}
					case 'Department':{
						data={
							name:this.adddepartment.name,
							text:this.adddepartment.text
						}
						break
					}
					case 'User':{
						data ={
							email : this.addrooter.name,
							password : this.addrooter.detail
						}
						break
					}
				}
				$.ajax({
					cache: false,
					url: "http://localhost:8089/"+values+"/add",
					type: 'get',
					data: data,
					dataType: 'JSON',
					traditional: true,
					success: function(arg) {
						console.log(arg)
						if(arg.code === 200){
							that.show_staff=false
							console.log("添加成功")
						}
						if(arg.code === 500){
							console.log("添加失败")
						}

					},
					error: function() {
						console.log("失败")
					}
				})
				console.log('submit', values);
			},
			changeSubmit(url){
				let that = this
				console.log(url)
				let data
				switch (url){
					case 'Staff':{
						data ={
							id :this.addstaffs.id,
							name : this.addstaffs.name,
							gender :this.addstaffs.gender,
							department : this.addstaffs.department,
							email : this.addstaffs.email
						}
						break
					}
					case 'Department':{
						data={
							id: this.adddepartment.id,
							name:this.adddepartment.name,
							text:this.adddepartment.text
						}
						break
					}
					case 'User':{
						data ={
							id: this.addrooter.id,
							email : this.addrooter.name,
							password : this.addrooter.detail
						}
						break
					}
				}
				$.ajax({
					cache: false,
					url: "http://localhost:8089/"+url+"/change",
					type: 'post',
					data: data,
					dataType: 'JSON',
					traditional: true,
					success: function(arg) {
						console.log(arg)
						if(arg.code === 200){
							switch (url){
								case 'Staff':{
									that.show_changeStaff=false
									break
								}
								case 'Department':{
									that.show_changeDepartment=false
									break
								}
								case 'User':{
									that.show_changeUser=false
									break
								}
							}
							console.log("修改成功")
						}
						if(arg.code === 500){
							console.log("修改失败")
						}

					},
					error: function() {
						console.log("失败")
					}
				})
				console.log('submit', url);
			},
			choose(index) {
				console.log(index)
				if (index == 1) {
					this.manage = 1
				}
				if (index == 2) {
					this.manage = 2
				}
				if (index == 3) {
					this.manage = 3
				}
				if (index == 4) {
					this.manage = 4
				}
				if (index == 5) {
					this.manage = 5
				}
				if (index == 6) {
					this.manage = 6
				}
			},
			//部门
			DepHandleSizeChange(val) {
				this.pageSize = val
				this.getDepartmentPage()
				console.log(`每页 ${val} 条`);
			},
			DepHandleCurrentChange(val) {
				this.currentPage = val
				this.getDepartmentPage()
				console.log(`当前页: ${val}`);
			},
			//员工
			StaffHandleSizeChange(val) {
				this.pageSize = val
				this.getStaffPage()
				console.log(`每页 ${val} 条`);
			},
			StaffHandleCurrentChange(val) {
				this.currentPage = val
				this.getStaffPage()
				console.log(`当前页: ${val}`);
			},
			//用户
			UserHandleSizeChange(val) {
				this.pageSize = val
				this.getUserPage()
				console.log(`每页 ${val} 条`);
			},
			UserHandleCurrentChange(val) {
				this.currentPage = val
				this.getUserPage()
				console.log(`当前页: ${val}`);
			},
			handleSelectionChange() {

			},
			open(){
				console.log(1)
			},
			handleEdit_root(index, row) {
				console.log(index, row);
				this.addrooter.id = row.id
				this.addrooter.password = row.password
				this.addrooter.name = row.email
				this.addrooter.detail = row.gender
				this.show_changeRoot = true
			},
			handleEdit_department(index, row) {
				console.log(index, row);
				this.adddepartment.id=row.id
				this.adddepartment.name = row.name
				//this.adddepartment.num = this.tableData_bumen[index].num
				this.adddepartment.detail = row.text
				this.show_changeDepartment = true
			},
			handleEdit(index, row) {
				console.log(index, row);
				this.addstaffs.id = row.id
				this.addstaffs.name = this.tableData_renyuan[index].name
				this.addstaffs.gender = this.tableData_renyuan[index].gender
				this.addstaffs.department = this.tableData_renyuan[index].department
				this.addstaffs.email = this.tableData_renyuan[index].email
				this.addstaffs.wages = this.tableData_renyuan[index].money
				this.addstaffs.city = this.tableData_renyuan[index].city
				this.addstaffs.marriage = this.tableData_renyuan[index].marriage
				this.show_changeStaff = true
			},

			handleDelete(index, row,url) {
				console.log(index, row);
				this.delete_text = row.name
				this.show_delete = true
				let data ={
					id : index
				}

				$.ajax({
					cache: false,
					url: "http://localhost:8089/"+url+"/del",
					type: 'post',
					data: data,
					dataType: 'JSON',
					traditional: true,
					success: function(arg) {
						console.log(arg)
						if(arg.code === 200){
							console.log(url+"删除成功")
						}
						if(arg.code === 500){
							console.log(url+"删除失败")
						}
					},
					error: function() {
						console.log("失败")
					}
				})
			},
			printer() {
				window.open(
						"http://localhost:8089/Staff/printer"
				);
			},
			onClickLeft() {

			},
			onClickRight() {
				window.localStorage.token = ""
				window.location.href="login.html"
			},
			handleOpen(key, keyPath) {
				console.log(key, keyPath);
			},
			handleOpen2(key, keyPath) {
				console.log(key, keyPath);
			},
			handleClose(key, keyPath) {
				console.log(key, keyPath);
			},
			getUserInfo() {

				var token = localStorage.token
				if (token != '203267340') {
					alert("请登录");
					window.location.href = "login.html"
				} else {
					// alert("登陆成功")
					return
				}
			},
			getStaffPage(){
				let that =this
				let page ={
					currPage: this.currentPage,
					pageSize: this.pageSize,
				}
				$.ajax({
					cache: false,
					url: "http://localhost:8089" + "/Staff/selectPage",
					type: 'post',
					data: page,
					dataType: 'JSON',
					traditional: true,
					success: function(arg) {
						console.log(arg)
						if(arg.code === 200){
							that.tableData_renyuan = arg.data.rows
							that.staff_pageTotal = arg.data.total
							console.log(arg.data.rows)
						}
						if(arg.code === 500){
							console.log("员工查询失败")
						}

					},
					error: function() {
						console.log("失败")
					}
				})
				console.log("员工获取成功")
				console.log(this.tableData_sys)
			},
			//获取部门表数据
			getDepartmentPage(){
				let that =this
				let page ={
					currPage: this.currentPage,
					pageSize: this.pageSize,
				}
				$.ajax({
					cache: false,
					url: "http://localhost:8089" + "/Department/selectPage",
					type: 'post',
					data: page,
					dataType: 'JSON',
					traditional: true,
					success: function(arg) {
						console.log(arg)
						if(arg.code === 200){
							that.tableData_bumen = arg.data.rows
							that.department_pageTotal = arg.data.total
							console.log(arg.data.rows)
						}
						if(arg.code === 500){
							console.log("部门获取失败")
						}
					},
					error: function() {
						console.log("失败")
					}
				})
				console.log("部门获取成功")
			},
			//获取用户表数据
			getUserPage(){
				let that =this
				let page ={
					currPage: this.currentPage,
					pageSize: this.pageSize,
				}
				$.ajax({
					cache: false,
					url: "http://localhost:8089" + "/user/selectPage",
					type: 'post',
					data: page,
					dataType: 'JSON',
					traditional: true,

					success: function(arg) {
						console.log(arg)
						if(arg.code === 200){
							that.tableData_sys = arg.data.rows
							that.user_pageTotal = arg.data.total
							console.log(arg.data.rows)
						}
						if(arg.code === 500){
							console.log("用户获取失败")
						}
					},
					error: function() {
						console.log("失败")
					}
				})
				console.log("用户获取成功")
			},
		},

		created(){
			this.getStaffPage()
			this.getDepartmentPage()
			this.getUserPage()
		},
		mounted() {
			this.getUserInfo()
		}
	})
</script>
</html>
+

